/**
 * @author liuxin
 * @e-mail lxtobe5@gmail.com
 * @update 2011.11.19
 * @prompt If you find my mistake, please contact with me via my e-mail.
 */
package DesignPattern_sample.FactoryPattern
{
	import DesignPattern_sample.DecoratorPattern.ConcreteDecorator3;
	
	import flash.display.Sprite;
	
	public class FactoryClient extends Sprite
	{
		private var _factory:IFactory;
		private var _object:ObjectMain;
		
		public function FactoryClient()
		{
			_factory = new Factory1();
			_object = _factory.CreateFactory();
			_object.method1();
			_object.method2();
			_object.method3();
			
			_factory = new Factory2();
			_object = _factory.CreateFactory();
			_object.method1();
			_object.method2();
			_object.method3();
			
			_factory = new Factory3();
			_object = _factory.CreateFactory();
			_object.method1();
			_object.method2();
			_object.method3();
		}
	}
}